class Solution {
public:
    bool reportSpam(vector<string>& message, vector<string>& bannedWords) {
        unordered_set<string> hash(bannedWords.begin(), bannedWords.end());
        int count = 0;
        for (auto& s : message)
        {
            if (hash.find(s) != hash.end())
                count++;
            if (count == 2)
                return true;
        }
        return false;
    }
};